package com.etc.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.etc.dao.MedicalHistoryMapper;
import com.etc.entity.MedicalHistory;
import com.etc.service.MedicalHistoryService;

/**
*@Author 陈伟杰
*@Date 2018年11月19日
*@Description 
*/
@Service(value="medicalHistoryService")
public class MedicalHistoryServiceImpl implements MedicalHistoryService{
	@Autowired
	private MedicalHistoryMapper medicalHistoryMapper;
	/**
	 * 添加病史
	 */
	@Override
	public int inserMedicalHistory(MedicalHistory medicalHistory) {
		// TODO Auto-generated method stub
		return medicalHistoryMapper.inserMedicalHistory(medicalHistory);
	}
	/**
	 * 查询病人病史总记录数
	 */
	@Override
	public int selCountMedicineHistoryByTel(String patientTel) {
		// TODO Auto-generated method stub
		return medicalHistoryMapper.selCountMedicineHistoryByTel(patientTel);
	}

	/**
	 * 查询病史
	 */
	@Override
	public List<MedicalHistory> selectMedicineByJoin(int pageStar,int pageSize) {
		// TODO Auto-generated method stub
		return medicalHistoryMapper.selectMedicineByJoin(pageStar,pageSize);
	}
	
	/**
	 * 查询病史总条数
	 * @return
	 */
	@Override
	public int countMedicineHistory() {
		// TODO Auto-generated method stub
		return medicalHistoryMapper.countMedicineHistory();
	}
}
